<template>
  <ul class="user-flow-item" v-if="ownList.length">
    <li v-for="item in ownList" :key="item.key" @click="clickFlow(item[ownClickField])" :class="{active: currentFlow === item[ownClickField]}">
      <span>{{ item.label }}</span>
      <span>{{ item.time }}</span>
    </li>
  </ul>
  <div class="empty" style="border-bottom: 1px solid #eee" v-else>暂无数据</div>
</template>

<script setup lang="ts">

import {useCurrentFlow} from "../util/hook.ts";
import {ownClickField, ownList} from "../config";

const props = defineProps({
  data: String
});

const {clickFlow, currentFlow} = useCurrentFlow();
</script>

<style scoped>
.active {
  background: rgb(235, 245, 255);
}
</style>
